import { Http } from "../http/http"

class NewsModel {
  static async newsList(type,page,pagesize){
    console.log(page, pagesize)
    return await Http.request({
        url: `system/news/list?status=1&newsType=${type}&pageNum=${page}&pageSize=${pagesize}`
    })
  }
  
  static async newsDetail(id){
    return await Http.request({
        url: `system/news/app/${id}`
    })
  }

  // 新闻点赞
  static async digNews(data){
    return await Http.request({
        url: `system/news/digNews`,
        method:'POST',
        data:data
    })
  }
}

export {
  NewsModel
}